/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package common;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author nicolas
 */
public class Config {

    static private Properties properties = null;

    /**
     * This method returns an accessor for the property system
     * Can be accessible from all application
     * @return
     */
    public synchronized static Properties getProperty() {
        if (properties == null) {
            try {
                properties = new Properties();
                properties.load(new FileInputStream("appconfig.properties"));
            } catch (IOException ex) {
                Logger.getLogger(Config.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return properties;
    }
}
